package com.baidu.mapapi;

import android.os.Bundle;
import android.os.Parcelable;
import android.util.Log;
import java.util.ArrayList;

class h
  implements g
{
  private MKSearchListener a;

  public h(MKSearchListener paramMKSearchListener)
  {
    this.a = paramMKSearchListener;
  }

  private void a(Bundle paramBundle, MKAddrInfo paramMKAddrInfo, int paramInt)
  {
    paramMKAddrInfo.strAddr = paramBundle.getString("addr");
    paramMKAddrInfo.addressComponents = new MKGeocoderAddressComponent();
    paramMKAddrInfo.addressComponents.streetNumber = paramBundle.getString("streetNumber");
    paramMKAddrInfo.addressComponents.street = paramBundle.getString("street");
    paramMKAddrInfo.addressComponents.district = paramBundle.getString("district");
    paramMKAddrInfo.addressComponents.city = paramBundle.getString("city");
    paramMKAddrInfo.addressComponents.province = paramBundle.getString("province");
    int i = paramBundle.getInt("x");
    paramMKAddrInfo.geoPt = new GeoPoint(paramBundle.getInt("y"), i);
    if (paramBundle.containsKey("aryCaption"))
    {
      String[] arrayOfString1 = paramBundle.getStringArray("aryCaption");
      String[] arrayOfString2 = paramBundle.getStringArray("aryAddr");
      String[] arrayOfString3 = paramBundle.getStringArray("aryTel");
      String[] arrayOfString4 = paramBundle.getStringArray("aryZip");
      int[] arrayOfInt1 = paramBundle.getIntArray("aryType");
      int[] arrayOfInt2 = paramBundle.getIntArray("aryX");
      int[] arrayOfInt3 = paramBundle.getIntArray("aryY");
      String str = paramBundle.getString("city");
      ArrayList localArrayList = new ArrayList();
      int j = arrayOfString1.length;
      for (int k = 0; k < j; ++k)
      {
        MKPoiInfo localMKPoiInfo = new MKPoiInfo();
        localMKPoiInfo.name = arrayOfString1[k];
        localMKPoiInfo.address = arrayOfString2[k];
        localMKPoiInfo.city = str;
        localMKPoiInfo.phoneNum = arrayOfString3[k];
        localMKPoiInfo.postCode = arrayOfString4[k];
        localMKPoiInfo.ePoiType = arrayOfInt1[k];
        localMKPoiInfo.pt = new GeoPoint(arrayOfInt3[k], arrayOfInt2[k]);
        localArrayList.add(localMKPoiInfo);
      }
      paramMKAddrInfo.poiList = localArrayList;
    }
  }

  private void a(Bundle paramBundle, MKDrivingRouteResult paramMKDrivingRouteResult, int paramInt)
  {
    while (true)
    {
      int i9;
      while (true)
      {
        String str1;
        ArrayList localArrayList1;
        MKRoutePlan localMKRoutePlan;
        ArrayList localArrayList2;
        int i1;
        MKRoute localMKRoute;
        Bundle localBundle1;
        ArrayList localArrayList4;
        ArrayList localArrayList5;
        int i6;
        ArrayList localArrayList6;
        int i7;
        try
        {
          str1 = paramBundle.getString("st_name");
          int i = paramBundle.getInt("st_pt_x");
          int j = paramBundle.getInt("st_pt_y");
          MKPlanNode localMKPlanNode1 = new MKPlanNode();
          localMKPlanNode1.name = str1;
          localMKPlanNode1.pt = new GeoPoint(j, i);
          paramMKDrivingRouteResult.a(localMKPlanNode1);
          String str2 = paramBundle.getString("en_name");
          int k = paramBundle.getInt("en_pt_x");
          int l = paramBundle.getInt("en_pt_y");
          MKPlanNode localMKPlanNode2 = new MKPlanNode();
          localMKPlanNode2.name = str2;
          localMKPlanNode2.pt = new GeoPoint(l, k);
          paramMKDrivingRouteResult.b(localMKPlanNode2);
          localArrayList1 = new ArrayList();
          if (paramBundle.getInt("planNum") > 0)
          {
            localMKRoutePlan = new MKRoutePlan();
            localMKRoutePlan.a(paramBundle.getInt("distance"));
            localArrayList2 = new ArrayList();
            Parcelable[] arrayOfParcelable1 = paramBundle.getParcelableArray("aryRoute");
            i1 = 0;
            if (i1 < arrayOfParcelable1.length)
            {
              localMKRoute = new MKRoute();
              localBundle1 = (Bundle)arrayOfParcelable1[i1];
              localMKRoute.a(localBundle1.getInt("distance"));
              localMKRoute.b(1);
              localMKRoute.a(localMKPlanNode1.pt);
              localMKRoute.b(localMKPlanNode2.pt);
              if (localBundle1.containsKey("link"))
              {
                int i5 = localBundle1.getInt("link");
                localArrayList4 = new ArrayList();
                localArrayList5 = new ArrayList();
                i6 = 0;
                if (i6 < i5)
                {
                  Object[] arrayOfObject1 = new Object[1];
                  arrayOfObject1[0] = Integer.valueOf(i6);
                  int[] arrayOfInt1 = localBundle1.getIntArray(String.format("aryX%d", arrayOfObject1));
                  Object[] arrayOfObject2 = new Object[1];
                  arrayOfObject2[0] = Integer.valueOf(i6);
                  int[] arrayOfInt2 = localBundle1.getIntArray(String.format("aryY%d", arrayOfObject2));
                  if (arrayOfInt1 == null)
                    break label833:
                  localArrayList6 = new ArrayList();
                  i7 = 0;
                  int i8 = arrayOfInt1.length;
                  if (i7 < i8)
                  {
                    if ((i7 != 0) && (arrayOfInt2[i7] == arrayOfInt2[(i7 - 1)]) && (arrayOfInt1[i7] == arrayOfInt1[(i7 - 1)]))
                      break label839:
                    label833: localArrayList6.add(new GeoPoint(arrayOfInt2[i7], arrayOfInt1[i7]));
                  }
                }
              }
            }
          }
        }
        catch (Exception localException)
        {
          while (true)
          {
            Log.d("MKSearchNotifier", "parse DrivingRouteResult error!");
            Log.d("MKSearchNotifier", localException.getMessage());
            while (true)
            {
              while (true)
              {
                return;
                localArrayList4.add(localArrayList6);
                Object[] arrayOfObject3 = new Object[1];
                arrayOfObject3[0] = Integer.valueOf(i6);
                int[] arrayOfInt3 = localBundle1.getIntArray(String.format("aryMcX%d", arrayOfObject3));
                Object[] arrayOfObject4 = new Object[1];
                arrayOfObject4[0] = Integer.valueOf(i6);
                int[] arrayOfInt4 = localBundle1.getIntArray(String.format("aryMcY%d", arrayOfObject4));
                if (arrayOfInt3 == null)
                  break label833;
                ArrayList localArrayList7 = new ArrayList();
                i9 = 0;
                int i10 = arrayOfInt3.length;
                if (i9 < i10)
                {
                  if ((i9 != 0) && (arrayOfInt4[i9] == arrayOfInt4[(i9 - 1)]) && (arrayOfInt3[i9] == arrayOfInt3[(i9 - 1)]))
                    break label845:
                  localArrayList7.add(new GeoPoint(arrayOfInt4[i9], arrayOfInt3[i9]));
                  break label845:
                }
                localArrayList5.add(localArrayList7);
                break label833:
                localMKRoute.b(localArrayList4);
                localMKRoute.a = localArrayList5;
                if (localBundle1.containsKey("aryStep"))
                {
                  ArrayList localArrayList3 = new ArrayList();
                  Parcelable[] arrayOfParcelable2 = localBundle1.getParcelableArray("aryStep");
                  for (int i2 = 0; i2 < arrayOfParcelable2.length; ++i2)
                  {
                    Bundle localBundle2 = (Bundle)arrayOfParcelable2[i2];
                    MKStep localMKStep = new MKStep();
                    int i3 = localBundle2.getInt("x");
                    int i4 = localBundle2.getInt("y");
                    GeoPoint localGeoPoint = new GeoPoint(i4, i3);
                    localMKStep.a(localGeoPoint);
                    localMKStep.a(localBundle2.getInt("dir"));
                    localMKStep.a(localBundle2.getString("tip"));
                    localArrayList3.add(localMKStep);
                  }
                  localMKRoute.a(localArrayList3);
                }
                localArrayList2.add(localMKRoute);
                ++i1;
              }
              localMKRoutePlan.a(localArrayList2);
              localArrayList1.add(localMKRoutePlan);
              paramMKDrivingRouteResult.a(localArrayList1);
            }
            ++i6;
          }
        }
        label839: ++i7;
      }
      label845: ++i9;
    }
  }

  private void a(Bundle paramBundle, MKPoiResult paramMKPoiResult, int paramInt)
  {
    switch (paramInt)
    {
    default:
      return;
    case 11:
    case 12:
    case 21:
    case 45:
    case 7:
    }
    try
    {
      int i6 = paramBundle.getInt("iTotal");
      int i7 = paramBundle.getInt("iCurrNumPois");
      int i8 = paramBundle.getInt("iPageIndex");
      paramMKPoiResult.b(i6);
      paramMKPoiResult.a(i7);
      paramMKPoiResult.d(i8);
      paramMKPoiResult.c(i6 / MKSearch.getPoiPageCapacity() + i6 % MKSearch.getPoiPageCapacity());
      String[] arrayOfString6 = paramBundle.getStringArray("aryCaption");
      String[] arrayOfString7 = paramBundle.getStringArray("aryAddr");
      String[] arrayOfString8 = paramBundle.getStringArray("aryTel");
      String[] arrayOfString9 = paramBundle.getStringArray("aryZip");
      int[] arrayOfInt5 = paramBundle.getIntArray("aryType");
      int[] arrayOfInt6 = paramBundle.getIntArray("aryX");
      int[] arrayOfInt7 = paramBundle.getIntArray("aryY");
      String str2 = paramBundle.getString("city");
      ArrayList localArrayList4 = new ArrayList();
      int i9 = arrayOfString6.length;
      for (int i10 = 0; i10 < i9; ++i10)
      {
        MKPoiInfo localMKPoiInfo2 = new MKPoiInfo();
        localMKPoiInfo2.name = arrayOfString6[i10];
        localMKPoiInfo2.address = arrayOfString7[i10];
        localMKPoiInfo2.city = str2;
        localMKPoiInfo2.phoneNum = arrayOfString8[i10];
        localMKPoiInfo2.postCode = arrayOfString9[i10];
        localMKPoiInfo2.ePoiType = arrayOfInt5[i10];
        localMKPoiInfo2.pt = new GeoPoint(arrayOfInt7[i10], arrayOfInt6[i10]);
        localArrayList4.add(localMKPoiInfo2);
      }
      paramMKPoiResult.a(localArrayList4);
    }
    catch (Exception localException2)
    {
      while (true)
      {
        Parcelable[] arrayOfParcelable;
        do
        {
          while (true)
          {
            Log.d("MKSearchNotifier", "parse PoiResult error!");
            Log.d("MKSearchNotifier", localException2.getMessage());
          }
          arrayOfParcelable = paramBundle.getParcelableArray("aryMultiPoiList");
        }
        while (arrayOfParcelable == null);
        int k = arrayOfParcelable.length;
        ArrayList localArrayList2 = new ArrayList();
        int l = 0;
        if (l < k)
        {
          MKPoiResult localMKPoiResult = new MKPoiResult();
          Bundle localBundle = (Bundle)arrayOfParcelable[l];
          if (localBundle == null)
            localArrayList2.add(localMKPoiResult);
          while (true)
          {
            while (true)
              ++l;
            ArrayList localArrayList3 = new ArrayList();
            int i1 = localBundle.getInt("iTotal");
            int i2 = localBundle.getInt("iCurrNumPois");
            int i3 = paramBundle.getInt("iPageIndex");
            localMKPoiResult.b(i1);
            localMKPoiResult.a(i2);
            localMKPoiResult.d(i3);
            localMKPoiResult.c(i1 / MKSearch.getPoiPageCapacity() + i1 % MKSearch.getPoiPageCapacity());
            String[] arrayOfString2 = localBundle.getStringArray("aryCaption");
            String[] arrayOfString3 = localBundle.getStringArray("aryAddr");
            String[] arrayOfString4 = localBundle.getStringArray("aryTel");
            String[] arrayOfString5 = localBundle.getStringArray("aryZip");
            int[] arrayOfInt2 = localBundle.getIntArray("aryType");
            int[] arrayOfInt3 = localBundle.getIntArray("aryX");
            int[] arrayOfInt4 = localBundle.getIntArray("aryY");
            String str1 = localBundle.getString("city");
            int i4 = arrayOfString2.length;
            for (int i5 = 0; i5 < i4; ++i5)
            {
              MKPoiInfo localMKPoiInfo1 = new MKPoiInfo();
              localMKPoiInfo1.name = arrayOfString2[i5];
              localMKPoiInfo1.address = arrayOfString3[i5];
              localMKPoiInfo1.city = str1;
              localMKPoiInfo1.phoneNum = arrayOfString4[i5];
              localMKPoiInfo1.postCode = arrayOfString5[i5];
              localMKPoiInfo1.ePoiType = arrayOfInt2[i5];
              localMKPoiInfo1.pt = new GeoPoint(arrayOfInt4[i5], arrayOfInt3[i5]);
              localArrayList3.add(localMKPoiInfo1);
            }
            localMKPoiResult.a(localArrayList3);
            localArrayList2.add(localMKPoiResult);
          }
        }
        paramMKPoiResult.b(localArrayList2);
      }
      try
      {
        String[] arrayOfString1 = paramBundle.getStringArray("aryCity");
        int[] arrayOfInt1 = paramBundle.getIntArray("aryNum");
        ArrayList localArrayList1 = new ArrayList();
        int i = arrayOfString1.length;
        for (int j = 0; j < i; ++j)
        {
          MKCityListInfo localMKCityListInfo = new MKCityListInfo();
          localMKCityListInfo.city = arrayOfString1[j];
          localMKCityListInfo.num = arrayOfInt1[j];
          localArrayList1.add(localMKCityListInfo);
        }
        paramMKPoiResult.c(localArrayList1);
      }
      catch (Exception localException1)
      {
        Log.d("MKSearchNotifier", "parse PoiResult error!");
        Log.d("MKSearchNotifier", localException1.getMessage());
      }
    }
  }

  private void a(Bundle paramBundle, MKTransitRouteResult paramMKTransitRouteResult, int paramInt)
  {
    while (true)
    {
      int i15;
      while (true)
      {
        int i17;
        while (true)
        {
          while (true)
          {
            int i6;
            while (true)
            {
              String str1;
              ArrayList localArrayList1;
              int i2;
              MKTransitRoutePlan localMKTransitRoutePlan;
              Bundle localBundle1;
              ArrayList localArrayList2;
              int i3;
              MKLine localMKLine;
              Bundle localBundle2;
              ArrayList localArrayList3;
              int i4;
              try
              {
                str1 = paramBundle.getString("st_name");
                int i = paramBundle.getInt("st_pt_x");
                int j = paramBundle.getInt("st_pt_y");
                MKPlanNode localMKPlanNode1 = new MKPlanNode();
                localMKPlanNode1.name = str1;
                localMKPlanNode1.pt = new GeoPoint(j, i);
                paramMKTransitRouteResult.a(localMKPlanNode1);
                String str2 = paramBundle.getString("en_name");
                int k = paramBundle.getInt("en_pt_x");
                int l = paramBundle.getInt("en_pt_y");
                MKPlanNode localMKPlanNode2 = new MKPlanNode();
                localMKPlanNode2.name = str2;
                localMKPlanNode2.pt = new GeoPoint(l, k);
                paramMKTransitRouteResult.b(localMKPlanNode2);
                localArrayList1 = new ArrayList();
                Parcelable[] arrayOfParcelable1 = paramBundle.getParcelableArray("aryPlan");
                if (arrayOfParcelable1 == null)
                {
                  paramMKTransitRouteResult.a(localArrayList1);
                }
                else
                {
                  int i1 = arrayOfParcelable1.length;
                  i2 = 0;
                  if (i2 < i1)
                  {
                    localMKTransitRoutePlan = new MKTransitRoutePlan();
                    localMKTransitRoutePlan.a(localMKPlanNode1.pt);
                    localMKTransitRoutePlan.b(localMKPlanNode2.pt);
                    localBundle1 = (Bundle)arrayOfParcelable1[i2];
                    localMKTransitRoutePlan.a(localBundle1.getInt("distance"));
                    localArrayList2 = new ArrayList();
                    Parcelable[] arrayOfParcelable2 = localBundle1.getParcelableArray("aryLine");
                    if (arrayOfParcelable2 != null)
                      break label1320;
                    arrayOfParcelable2 = new Parcelable[0];
                    break label1320:
                    if (i3 < arrayOfParcelable2.length)
                    {
                      localMKLine = new MKLine();
                      localBundle2 = (Bundle)arrayOfParcelable2[i3];
                      localMKLine.b(localBundle2.getInt("distance"));
                      localMKLine.c(localBundle2.getInt("type"));
                      localMKLine.a(localBundle2.getInt("numStops"));
                      localMKLine.b(localBundle2.getString("title"));
                      localMKLine.c(localBundle2.getString("uid"));
                      localMKLine.a(localBundle2.getString("getOnTip"));
                      MKPoiInfo localMKPoiInfo1 = new MKPoiInfo();
                      localMKPoiInfo1.name = localBundle2.getString("getOnStopName");
                      if (localBundle2.containsKey("getOnStopPtX"))
                      {
                        int i10 = localBundle2.getInt("getOnStopPtX");
                        int i11 = localBundle2.getInt("getOnStopPtY");
                        GeoPoint localGeoPoint2 = new GeoPoint(i11, i10);
                        localMKPoiInfo1.pt = localGeoPoint2;
                      }
                      localMKLine.a(localMKPoiInfo1);
                      MKPoiInfo localMKPoiInfo2 = new MKPoiInfo();
                      localMKPoiInfo2.name = localBundle2.getString("getOffStopName");
                      if (localBundle2.containsKey("getOffStopPtX"))
                      {
                        int i8 = localBundle2.getInt("getOffStopPtX");
                        int i9 = localBundle2.getInt("getOffStopPtY");
                        GeoPoint localGeoPoint1 = new GeoPoint(i9, i8);
                        localMKPoiInfo2.pt = localGeoPoint1;
                      }
                      localMKLine.b(localMKPoiInfo2);
                      int[] arrayOfInt1 = localBundle2.getIntArray("aryX");
                      if (arrayOfInt1 != null)
                      {
                        localArrayList3 = new ArrayList();
                        int[] arrayOfInt2 = localBundle2.getIntArray("aryY");
                        i4 = 0;
                        int i5 = arrayOfInt1.length;
                        if (i4 < i5)
                        {
                          if ((i4 != 0) && (arrayOfInt2[i4] == arrayOfInt2[(i4 - 1)]) && (arrayOfInt1[i4] == arrayOfInt1[(i4 - 1)]))
                            break label1326:
                          label1319: label1320: localArrayList3.add(new GeoPoint(arrayOfInt2[i4], arrayOfInt1[i4]));
                        }
                      }
                    }
                  }
                }
              }
              catch (Exception localException)
              {
                while (true)
                {
                  while (true)
                  {
                    while (true)
                    {
                      Log.d("MKSearchNotifier", "parse TransitRouteResult error!");
                      Log.d("MKSearchNotifier", localException.getMessage());
                      break label1319:
                      localMKLine.a(localArrayList3);
                      int[] arrayOfInt3 = localBundle2.getIntArray("aryMcX");
                      if (arrayOfInt3 != null)
                      {
                        ArrayList localArrayList4 = new ArrayList();
                        int[] arrayOfInt4 = localBundle2.getIntArray("aryMcY");
                        i6 = 0;
                        int i7 = arrayOfInt3.length;
                        if (i6 < i7)
                        {
                          if ((i6 != 0) && (arrayOfInt4[i6] == arrayOfInt4[(i6 - 1)]) && (arrayOfInt3[i6] == arrayOfInt3[(i6 - 1)]))
                            break label1332:
                          localArrayList4.add(new GeoPoint(arrayOfInt4[i6], arrayOfInt3[i6]));
                          break label1332:
                        }
                        localMKLine.a = localArrayList4;
                      }
                      localArrayList2.add(localMKLine);
                      ++i3;
                    }
                    localMKTransitRoutePlan.setLine(localArrayList2);
                    ArrayList localArrayList5 = new ArrayList();
                    Parcelable[] arrayOfParcelable3 = localBundle1.getParcelableArray("aryRoute");
                    if (arrayOfParcelable3 != null)
                      break label1338;
                    arrayOfParcelable3 = new Parcelable[0];
                    break label1338:
                    while (i12 < arrayOfParcelable3.length)
                    {
                      MKRoute localMKRoute = new MKRoute();
                      Bundle localBundle3 = (Bundle)arrayOfParcelable3[i12];
                      localMKRoute.a(localBundle3.getInt("distance"));
                      localMKRoute.b(2);
                      localMKRoute.a(localBundle3.getString("getOffTip"));
                      ArrayList localArrayList6 = new ArrayList();
                      ArrayList localArrayList7 = new ArrayList();
                      if (localBundle3.containsKey("startX"))
                      {
                        int i19 = localBundle3.getInt("startX");
                        int i20 = localBundle3.getInt("startY");
                        GeoPoint localGeoPoint4 = new GeoPoint(i20, i19);
                        localMKRoute.a(localGeoPoint4);
                      }
                      if (localBundle3.containsKey("aryX"))
                      {
                        int[] arrayOfInt7 = localBundle3.getIntArray("aryX");
                        int[] arrayOfInt8 = localBundle3.getIntArray("aryY");
                        i17 = 0;
                        int i18 = arrayOfInt7.length;
                        if (i17 < i18)
                        {
                          if ((i17 != 0) && (arrayOfInt8[i17] == arrayOfInt8[(i17 - 1)]) && (arrayOfInt7[i17] == arrayOfInt7[(i17 - 1)]))
                            break label1344:
                          localArrayList6.add(new GeoPoint(arrayOfInt8[i17], arrayOfInt7[i17]));
                          break label1344:
                        }
                      }
                      if (localBundle3.containsKey("aryMcX"))
                      {
                        int[] arrayOfInt5 = localBundle3.getIntArray("aryMcX");
                        int[] arrayOfInt6 = localBundle3.getIntArray("aryMcY");
                        i15 = 0;
                        int i16 = arrayOfInt5.length;
                        if (i15 < i16)
                        {
                          if ((i15 != 0) && (arrayOfInt6[i15] == arrayOfInt6[(i15 - 1)]) && (arrayOfInt5[i15] == arrayOfInt5[(i15 - 1)]))
                            break label1350:
                          localArrayList7.add(new GeoPoint(arrayOfInt6[i15], arrayOfInt5[i15]));
                          break label1350:
                        }
                      }
                      if (localBundle3.containsKey("endX"))
                      {
                        int i13 = localBundle3.getInt("endX");
                        int i14 = localBundle3.getInt("endY");
                        GeoPoint localGeoPoint3 = new GeoPoint(i14, i13);
                        localMKRoute.b(localGeoPoint3);
                      }
                      ArrayList localArrayList8 = new ArrayList();
                      localArrayList8.add(localArrayList6);
                      localMKRoute.b(localArrayList8);
                      ArrayList localArrayList9 = new ArrayList();
                      localArrayList9.add(localArrayList7);
                      localMKRoute.a = localArrayList9;
                      localArrayList5.add(localMKRoute);
                      ++i12;
                    }
                    localMKTransitRoutePlan.a(localArrayList5);
                    localArrayList1.add(localMKTransitRoutePlan);
                    ++i2;
                  }
                  paramMKTransitRouteResult.a(localArrayList1);
                  return;
                  i3 = 0;
                }
              }
              label1326: ++i4;
            }
            label1332: ++i6;
          }
          label1338: int i12 = 0;
        }
        label1344: ++i17;
      }
      label1350: ++i15;
    }
  }

  private void a(Bundle paramBundle, MKWalkingRouteResult paramMKWalkingRouteResult, int paramInt)
  {
    while (true)
    {
      int i9;
      while (true)
      {
        String str1;
        ArrayList localArrayList1;
        MKRoutePlan localMKRoutePlan;
        ArrayList localArrayList2;
        int i1;
        MKRoute localMKRoute;
        Bundle localBundle1;
        ArrayList localArrayList4;
        ArrayList localArrayList5;
        int i6;
        ArrayList localArrayList6;
        int i7;
        try
        {
          str1 = paramBundle.getString("st_name");
          int i = paramBundle.getInt("st_pt_x");
          int j = paramBundle.getInt("st_pt_y");
          MKPlanNode localMKPlanNode1 = new MKPlanNode();
          localMKPlanNode1.name = str1;
          localMKPlanNode1.pt = new GeoPoint(j, i);
          paramMKWalkingRouteResult.a(localMKPlanNode1);
          String str2 = paramBundle.getString("en_name");
          int k = paramBundle.getInt("en_pt_x");
          int l = paramBundle.getInt("en_pt_y");
          MKPlanNode localMKPlanNode2 = new MKPlanNode();
          localMKPlanNode2.name = str2;
          localMKPlanNode2.pt = new GeoPoint(l, k);
          paramMKWalkingRouteResult.b(localMKPlanNode2);
          localArrayList1 = new ArrayList();
          if (paramBundle.getInt("planNum") > 0)
          {
            localMKRoutePlan = new MKRoutePlan();
            localMKRoutePlan.a(paramBundle.getInt("distance"));
            localArrayList2 = new ArrayList();
            Parcelable[] arrayOfParcelable1 = paramBundle.getParcelableArray("aryRoute");
            i1 = 0;
            if (i1 < arrayOfParcelable1.length)
            {
              localMKRoute = new MKRoute();
              localBundle1 = (Bundle)arrayOfParcelable1[i1];
              localMKRoute.a(localBundle1.getInt("distance"));
              localMKRoute.b(2);
              localMKRoute.a(localMKPlanNode1.pt);
              localMKRoute.b(localMKPlanNode2.pt);
              if (localBundle1.containsKey("link"))
              {
                int i5 = localBundle1.getInt("link");
                localArrayList4 = new ArrayList();
                localArrayList5 = new ArrayList();
                i6 = 0;
                if (i6 < i5)
                {
                  Object[] arrayOfObject1 = new Object[1];
                  arrayOfObject1[0] = Integer.valueOf(i6);
                  int[] arrayOfInt1 = localBundle1.getIntArray(String.format("aryX%d", arrayOfObject1));
                  Object[] arrayOfObject2 = new Object[1];
                  arrayOfObject2[0] = Integer.valueOf(i6);
                  int[] arrayOfInt2 = localBundle1.getIntArray(String.format("aryY%d", arrayOfObject2));
                  if (arrayOfInt1 == null)
                    break label834:
                  localArrayList6 = new ArrayList();
                  i7 = 0;
                  int i8 = arrayOfInt1.length;
                  if (i7 < i8)
                  {
                    if ((i7 != 0) && (arrayOfInt2[i7] == arrayOfInt2[(i7 - 1)]) && (arrayOfInt1[i7] == arrayOfInt1[(i7 - 1)]))
                      break label840:
                    label834: localArrayList6.add(new GeoPoint(arrayOfInt2[i7], arrayOfInt1[i7]));
                  }
                }
              }
            }
          }
        }
        catch (Exception localException)
        {
          while (true)
          {
            Log.d("MKSearchNotifier", "parse WalkingRouteResult error!");
            Log.d("MKSearchNotifier", localException.getMessage());
            while (true)
            {
              while (true)
              {
                return;
                localArrayList4.add(localArrayList6);
                Object[] arrayOfObject3 = new Object[1];
                arrayOfObject3[0] = Integer.valueOf(i6);
                int[] arrayOfInt3 = localBundle1.getIntArray(String.format("aryMcX%d", arrayOfObject3));
                Object[] arrayOfObject4 = new Object[1];
                arrayOfObject4[0] = Integer.valueOf(i6);
                int[] arrayOfInt4 = localBundle1.getIntArray(String.format("aryMcY%d", arrayOfObject4));
                if (arrayOfInt3 == null)
                  break label834;
                ArrayList localArrayList7 = new ArrayList();
                i9 = 0;
                int i10 = arrayOfInt3.length;
                if (i9 < i10)
                {
                  if ((i9 != 0) && (arrayOfInt4[i9] == arrayOfInt4[(i9 - 1)]) && (arrayOfInt3[i9] == arrayOfInt3[(i9 - 1)]))
                    break label846:
                  localArrayList7.add(new GeoPoint(arrayOfInt4[i9], arrayOfInt3[i9]));
                  break label846:
                }
                localArrayList5.add(localArrayList7);
                break label834:
                localMKRoute.b(localArrayList4);
                localMKRoute.a = localArrayList5;
                if (localBundle1.containsKey("aryStep"))
                {
                  ArrayList localArrayList3 = new ArrayList();
                  Parcelable[] arrayOfParcelable2 = localBundle1.getParcelableArray("aryStep");
                  for (int i2 = 0; i2 < arrayOfParcelable2.length; ++i2)
                  {
                    Bundle localBundle2 = (Bundle)arrayOfParcelable2[i2];
                    MKStep localMKStep = new MKStep();
                    int i3 = localBundle2.getInt("x");
                    int i4 = localBundle2.getInt("y");
                    GeoPoint localGeoPoint = new GeoPoint(i4, i3);
                    localMKStep.a(localGeoPoint);
                    localMKStep.a(localBundle2.getInt("dir"));
                    localMKStep.a(localBundle2.getString("tip"));
                    localArrayList3.add(localMKStep);
                  }
                  localMKRoute.a(localArrayList3);
                }
                localArrayList2.add(localMKRoute);
                ++i1;
              }
              localMKRoutePlan.a(localArrayList2);
              localArrayList1.add(localMKRoutePlan);
              paramMKWalkingRouteResult.a(localArrayList1);
            }
            ++i6;
          }
        }
        label840: ++i7;
      }
      label846: ++i9;
    }
  }

  public void a(MKEvent paramMKEvent)
  {
    MKPoiResult localMKPoiResult;
    int i;
    int j;
    switch (paramMKEvent.a)
    {
    default:
    case 1:
      Bundle localBundle4;
      while (true)
      {
        while (true)
        {
          return;
          if (paramMKEvent.b == 0)
            break;
          this.a.onGetPoiResult(null, 0, paramMKEvent.b);
        }
        localBundle4 = Mj.getNewBundle(11010204, paramMKEvent.c, 0);
        if (localBundle4 == null)
          break label267;
        if (paramMKEvent.c != 44)
          break;
        MKAddrInfo localMKAddrInfo = new MKAddrInfo();
        a(localBundle4, localMKAddrInfo, paramMKEvent.c);
        this.a.onGetAddrResult(localMKAddrInfo, 0);
      }
      localMKPoiResult = new MKPoiResult();
      a(localBundle4, localMKPoiResult, paramMKEvent.c);
      if (paramMKEvent.c != 45)
        break label248;
      ArrayList localArrayList = localMKPoiResult.getMultiPoiResult();
      if (localArrayList == null)
        break label556;
      j = 0;
      if (j >= localArrayList.size())
        break label556;
      if (((MKPoiResult)localArrayList.get(j)).getAllPoi() == null)
        break label223;
      i = 1;
    case 2:
    case 3:
    case 4:
    }
    while (true)
    {
      while (true)
      {
        while (true)
        {
          while (true)
          {
            while (true)
            {
              while (true)
              {
                while (true)
                {
                  while (true)
                  {
                    while (true)
                    {
                      while (true)
                      {
                        while (true)
                        {
                          while (true)
                          {
                            while (true)
                            {
                              while (true)
                              {
                                while (true)
                                {
                                  if (i != 0)
                                    break label229;
                                  this.a.onGetPoiResult(null, paramMKEvent.c, 100);
                                }
                                label223: ++j;
                              }
                              label229: this.a.onGetPoiResult(localMKPoiResult, paramMKEvent.c, 0);
                            }
                            label248: this.a.onGetPoiResult(localMKPoiResult, paramMKEvent.c, 0);
                          }
                          label267: this.a.onGetPoiResult(null, 0, 100);
                        }
                        if (paramMKEvent.b == 0)
                          break;
                        this.a.onGetTransitRouteResult(null, paramMKEvent.b);
                      }
                      Bundle localBundle3 = Mj.getNewBundle(11020204, paramMKEvent.c, 0);
                      if (localBundle3 == null)
                        break;
                      MKTransitRouteResult localMKTransitRouteResult = new MKTransitRouteResult();
                      a(localBundle3, localMKTransitRouteResult, paramMKEvent.c);
                      this.a.onGetTransitRouteResult(localMKTransitRouteResult, 0);
                    }
                    this.a.onGetTransitRouteResult(null, 100);
                  }
                  if (paramMKEvent.b == 0)
                    break;
                  this.a.onGetDrivingRouteResult(null, paramMKEvent.b);
                }
                Bundle localBundle2 = Mj.getNewBundle(11020204, paramMKEvent.c, 0);
                if (localBundle2 == null)
                  break;
                MKDrivingRouteResult localMKDrivingRouteResult = new MKDrivingRouteResult();
                a(localBundle2, localMKDrivingRouteResult, paramMKEvent.c);
                this.a.onGetDrivingRouteResult(localMKDrivingRouteResult, 0);
              }
              this.a.onGetDrivingRouteResult(null, 100);
            }
            if (paramMKEvent.b == 0)
              break;
            this.a.onGetWalkingRouteResult(null, paramMKEvent.b);
          }
          Bundle localBundle1 = Mj.getNewBundle(11020204, paramMKEvent.c, 0);
          if (localBundle1 == null)
            break;
          MKWalkingRouteResult localMKWalkingRouteResult = new MKWalkingRouteResult();
          a(localBundle1, localMKWalkingRouteResult, paramMKEvent.c);
          this.a.onGetWalkingRouteResult(localMKWalkingRouteResult, 0);
        }
        this.a.onGetWalkingRouteResult(null, 100);
      }
      label556: i = 0;
    }
  }
}